import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询房间列表
export function getRoomList(data,query) {
  return request({
    url: '/bussiness/ROOM/list',
    method: 'post',
    params: query,
    data: data,
    isEncrypt: false
  })
}

// 查询房间详情
export function getRoomInfo(id) {
  return request({
    url: '/bussiness/ROOM/info?id=' + id,
    method: 'get',
  })
}

// 新增房间/dev-api/bussiness/ROOM/add
export function createRoom(data) {
  return request({
    url: '/bussiness/ROOM/add',
    method: 'post',
    data: data,
    isEncrypt: false
  })
}

// 修改房间
export function editRoom(data) {
  return request({
    url: '/bussiness/ROOM/edit',
    method: 'post',
    data: data,
    isEncrypt: false
  })
}

// 删除房间
export function deleteRoom(roomId) {
  return request({
    url: '/bussiness/ROOM/remove?ids=' + roomId,
    method: 'post',
    isEncrypt: false
  })
}

// 查询房间类型列表
export function getRoomTypeList(data,query) {
  return request({
    url: '/bussiness/ROOMTYPE/list',
    method: 'post',
    params: query,
    data: data,
    isEncrypt: false
  })
}

// 查询房间类型详情
export function getRoomTypeInfo(id) {
  return request({
    url: '/bussiness/ROOMTYPE/info?id=' + id,
    method: 'get',
  })
}

// 新增房间类型
export function createRoomType(data) {
  return request({
    url: '/bussiness/ROOMTYPE/add',
    method: 'post',
    data: data,
    isEncrypt: false
  })
}

// 修改房间类型
export function editRoomType(data) {
  return request({
    url: '/bussiness/ROOMTYPE/edit',
    method: 'post',
    data: data,
    isEncrypt: false
  })
}

// 删除房间类型
export function deleteRoomType(roomId) {
  return request({
    url: '/bussiness/ROOMTYPE/remove?ids=' + roomId,
    method: 'post',
    isEncrypt: false
  })
}